package com.surveillance.BO;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.surveillance.DAO.ConcoursDao;
import com.surveillance.entities.Concours;

@Service("ConcoursBO")
public class ConcoursBO implements BOLayer<Concours>{

	 @Autowired
     private ConcoursDao concoursDAO ;
	 
	 
	public ConcoursDao getConcoursDAO() {
		return concoursDAO;
	}

	public void setConcoursDAO(ConcoursDao concoursDAO) {
		this.concoursDAO = concoursDAO;
	}

	@Override
	public boolean save(Concours myEntity) {
		concoursDAO.save(myEntity);
		return true;
	}

	@Override
	public void update(Concours myEntity) {
		concoursDAO.update(myEntity);
		
	}

	@Override
	public void delete(Concours myEntity) {
		concoursDAO.delete(myEntity);		
	}

	@Override
	public Concours findByID(Long myEntityID) {
		return  concoursDAO.findByID(myEntityID);
	}
	@Override
	public List<Concours> findAll() {
		return concoursDAO.findAll();
	}

}
